package sanshi.contect.udpstarter.service.impl;

import lombok.extern.slf4j.Slf4j;
import sanshi.contect.udpstarter.service.UDPMsgHandler;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * 默认实现消息处理类
 * @author sanshi
 */

@Slf4j
public class DefaultUdpMsgHandlerImpl implements UDPMsgHandler {

    private static AtomicInteger count = new AtomicInteger();

    @Override
    public void handMsg(byte[] bytes) {

        log.info(Thread.currentThread().getName() + "消费消息==>" + count.incrementAndGet() + "消费消息==>" + new String(bytes));
    }

}
